﻿<UserControl x:Class="WPLDB.Package.UI.View.ChooseDatabaseView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="400">
    <Grid>
        <!--Page Resouces-->
        <Grid.Resources>
            <Style TargetType="Button" x:Key="NewConnectionStyle">
                <Setter Property="Margin" Value="5,0"></Setter>
                <Setter Property="Width" Value="150"></Setter>
                <Setter Property="Height" Value="30"></Setter>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="25"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <!--Page Elements-->
        <TextBlock Text="{Binding Question}" Grid.Row="0" VerticalAlignment="Center" FontWeight="Bold"></TextBlock>               
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition Width="175"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBox Text="{Binding SelectedDatabase}" VerticalAlignment="Center"  Height="25" VerticalContentAlignment="Center" IsEnabled="False" Grid.Column="0" ></TextBox>
            <Button Command="{Binding NewConnectionCommand}" Content="New _Connection..." Style="{StaticResource NewConnectionStyle}" Grid.Column="1" ></Button>
        </Grid>
        <TextBlock Text="{Binding Description}" VerticalAlignment="Bottom"   Grid.Row="2"></TextBlock>
        <TextBox Text="{Binding DisplayConnectionString}" Grid.Row="3" IsEnabled="False" Margin="0,5" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"></TextBox>

    </Grid>
</UserControl>
